package day10.edu;

// Created: 11/09/2025, ChangJiang Ru
public class EvenNumber {

    public static void main(String[] args) {
        // Create a subclass object of Thread
        PrintNumber p1 = new PrintNumber();
        // Through the object to invoke the start method
        p1.start();

        for (int i = 0; i <= 10000; i++) {
            if(i % 2 == 0)
            {
                System.out.println(Thread.currentThread().getName() + i + "=========");
            }
        }
    }
}

// Case 1: Create a subclass of Thread
class PrintNumber extends Thread
{
    @Override
    public void run()
    {
        for (int i = 0; i <= 10000; i++) {
            if(i % 2 == 0)
            {
                System.out.println(Thread.currentThread().getName()+ ":" + i);
            }
            
        }
    }
}
